<%= javascript_include_tag 'comment/comment.js' %>
<%= stylesheet_link_tag 'comment/comment.css' %>
<%= render "main/head" %>
<body class="main_background">
  <div style="text-align: center;color: #ffffff;">
    <div class="currency_frame">
      <% @note_info.each do |note_info| %>

          <div class="note_fram">
            <div class="comment_user_info" onclick="jump_page('/main/get_user_info?user_name=<%= note_info[2].name %>')">
              <img src="<%= note_info[2].user_image %>">
              <span><%= note_info[2].name %> </span>回复
              <br>
              <span><%= note_info[0].created_at.to_s.slice(5,11) %></span>
            </div>

            <div class="comment_note_info" onclick="jump_page('/note_info/get_note?note_id=<%= note_info[1].id %>')">
              <img src="<%= note_info[1].note_photo %>">
              <%= note_info[1].user_id %>: <span><%= note_info[1].content.length > 10 ? note_info[1].content.slice(0,10) +'......' : note_info[1].content %></span>
            </div>
            <div onclick="show_comment(<%= note_info[0].id %>)" style="margin: 10px 20px;text-align: left" class="margin-right-20">
              <%= image_tag "reply",:class => 'icon' %>
              <span >评论</span>
            </div>
            <div class="comment_info">
              <img src="<%= note_info[2].user_image %>">
              <div>
                <span><%= note_info[0].comment_user_id %></span>
                <span>回复</span>
                <span><%= note_info[0].to_uesr_id %>:</span>
                <span><%= note_info[0].comment_content %></span>
              </div>
              <span style="width: 300px;"><%= note_info[0].updated_at.to_s.slice(5,11) %></span>
            </div>

            <div id="comment_input_fram<%= note_info[0].id %>" class="comment_input_fram">
              <textarea id="comment<%= note_info[0].id  %>" rows="3" ></textarea>
              <button onclick="send_comment(<%= note_info[0].id %>,<%= note_info[0].comment_note_id %>,'<%= note_info[0].comment_user_id %>')">回复</button>
            </div>
            <br/>
          </div>
      <% end %>
    </div>
  </div>
</body>
